package fun.codefarmer.pm.service.Impl;

import fun.codefarmer.pm.mapper.RoleMapper;
import fun.codefarmer.pm.model.Role;
import fun.codefarmer.pm.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ ClassName RoleService
 * @ Descriotion TODO
 * @ author  codeFarmer_z
 * @ 公众号：码农教程
 * @ Date 2022/4/23 18:47
 **/
@Service
public class RoleServiceImpl implements RoleService {
    @Resource
    private RoleMapper roleMapper;
    @Override
    public Boolean deleteRoleById(Integer rid) {
        int i = roleMapper.deleteByPrimaryKey(rid);
        return i>0;
    }

    @Override
    public List<Role> getAllRole() {

        return roleMapper.getAllRole();
    }
}
